﻿@using DungeonGenerator.Java
@model DungeonGenerator.Java.Tile
@{
    //tile source: http://www.dungeoneering.net/all-downloads/
    //var basedir = "http://imaginarydevelopment.com/assets/planetcute%20PNG/";
    var baseDir = "~/Content/assets/PlanetCute PNG";
    var src = string.Empty;
    var rnd = new Random();
    switch (Model)
{
    case Tile.Chest:
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.UNUSED.other.chest_png;
        break;
            case Tile.DirtFloor:
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.floor.Url("cobble_blood"+rnd.Next(1,12+1)+".png");
        break;
            case Tile.Corridor: //use dirt floor for corridors, stone floor for rooms
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.floor.Url("pebble_brown"+rnd.Next(0,8+1)+".png");
        break;
            case Tile.DirtWall:
        src =Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.wall.Url("brick_brown" + rnd.Next(0, 7 + 1) + ".png");
        break;
            case Tile.Door:
            src =Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.dngn_closed_door_png;
        break;
            case Tile.Downstairs:
            src=Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.gateways.stone_stairs_down_png;
        break;
            case Tile.StoneWall:
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.wall.Url("stone_brick" + rnd.Next(1, 12 + 1) + ".png");
        break;
            case Tile.Unused:
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.dngn_unseen_png;
        break;
        case Tile.Upstairs:
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.gateways.stone_stairs_up_png;
        break;
               
        default:
        src = Links.Content.assets.crawl_tiles_Oct_5_2010.dc_dngn.wall.Url( "stone_brick"+rnd.Next(1,12+1)+".png");
        break;
}
}
<img src="@Url.Content(src)" />

